home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Camelot / Camelot 105 (1991-02)(Swedish User Group of Amiga)(SE)(PD)[WB].zip / Camelot 105 (1991-02)(Swedish User Group of Amiga)(SE)(PD)[WB].adf / AmigaUUCP / dnews / filereq.c < prev    next >
C/C++ Source or Header  |  1990-05-27  |  551b  |  31 lines

  1.  
  2. /*
  3.  *  FILEREQ.C
  4.  */
  5.  
  6. #include "defs.h"
  7.  
  8. Prototype char *GetFileName(int);
  9.  
  10. char    FileName[4][128];
  11. char    DirName[4][128];
  12. char    *ReqType[] = { "Write To File", "" };
  13. char    CombName[128];
  14.  
  15. char *
  16. GetFileName(which)
  17. int which;
  18. {
  19.     if (arpreq(ReqType[which], FileName[which], DirName[which], NULL)) {
  20.     short len = strlen(DirName[which]);
  21.     strcpy(CombName, DirName[which]);
  22.     if (len && CombName[len-1] != '/' && CombName[len-1] != ':')
  23.         strcat(CombName+len, "/");
  24.     strcat(CombName+len, FileName[which]);
  25.     return(CombName);
  26.     }
  27.     return(NULL);
  28. }
  29.  
  30.  
  31.